export default {
  // Global page headers: https://go.nuxtjs.dev/config-head
  head: {

    title: 'KOLfinds',
    htmlAttrs: {
      lang: 'en'
    },
    meta: [
      { charset: 'utf-8' },
      { name: 'viewport', content: 'width=device-width, initial-scale=1' },
      { hid: 'description', name: 'description', content: '' },
      { name: 'format-detection', content: 'telephone=no' }
    ],
    link: [
      { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
    ],
    script: []
  },
  loading: '@/pages/loading.vue',
  // Global CSS: https://go.nuxtjs.dev/config-css
  css: [
    'element-ui/lib/theme-chalk/index.css',
    'element-ui/lib/theme-chalk/display.css', // Element 额外提供了一系列类名，用于在某些条件下隐藏元素 参考https://element.eleme.cn/#/zh-CN/component/layout#ji-yu-duan-dian-de-yin-cang-lei
    '~/assets/elTheme/index.css',
    '~/assets/scss/index.scss'
  ],

  server: {
    host: '0.0.0.0',
    port: '3101'
  },

  axios: {
    proxy: true,
    retry: { retries: 3 }
  },

  // https://www.nuxtjs.cn/faq/http-proxy
  proxy: {
    '/api': {
      // target: 'http://43.135.146.19:5802//md-api',
      target: 'http://192.168.1.4:5802/md-api',
      pathRewrite: {
        '^/api': ''
      }
    }
  },
  // Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
  plugins: [
    '@/plugins/element-ui',
    '@/plugins/echarts',
    { src: '@/plugins/interceptor.js', ssr: false },
    { src: '@/plugins/main.js', ssr: false }
    // {
    //   src: '@/plugins/rem',
    //   ssr: false
    // }
  ],

  // Auto import components: https://go.nuxtjs.dev/config-components
  components: true,

  // Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
  buildModules: [

  ],

  // Modules: https://go.nuxtjs.dev/config-modules
  modules: [
    // scss全局变量
    '@nuxtjs/style-resources',
    '@nuxtjs/proxy',
    '@nuxtjs/axios'
  ],
  styleResources: {
    // scss全局变量
    scss: '~/assets/scss/vars.scss'
  },

  // Build Configuration: https://go.nuxtjs.dev/config-build
  build: {
    transpile: [/^element-ui/]
  }
}
